package com.cloudkinto.service.platform;

import com.cloudkinto.entity.PlatformStoreDo;
import com.baomidou.mybatisplus.extension.service.IService;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.service.platform.vo.store.*;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author hua
 * @since 2024-12-25
 */
public interface PlatformStoreService extends IService<PlatformStoreDo> {
    boolean check(Long id, String storeCode, Long companyId);

    Object update(PlatformUpdateReq updateVo, Long userId, Long companyId);

    Object ableStatus(PlatformUpdateStatusReq req, Long userId, Long companyId);

    int delete(Long id, Long userId);


    SingleResult pageInit();

    List<PlatformStoreRes> getList(Long companyId);

    List<PlatformStoreRes> getList(Long companyId, Long tenantId, String source);

    List<PlatformStoreRes> getList(Map<String, String> map);

    PageResult getListPage(Map<String, String> map);

    List<Map<String, Object>> statusStatistics(Map<String, String> map);

    /**
     * 店铺密钥过期 更新授权状态
     */
    void updateStoreAuthStatus(Long storeId);

    void updateStorePresale(Long storeId, Integer presales, Long userId);

    /**
     * 亚马逊店铺新增
     */
    PlatformStoreDo amazonStoreAdd(StoreAmazonAddReq req, Long userId);

    PlatformStoreDo yahooStoreAdd(StoreYahooAddReq req, Long userId);

    /**
     * 乐天店铺授权
     */
    void rakutenStoreAdd(StoreRakutenAddReq req, Long userId, Long companyId);

    PlatformStoreDo shopifyStoreAdd(StoreShopifyAddReq req, Long userId);

    PlatformStoreDo maekshopStoreAdd(StoreMakeshopAddReq req, Long userId,Long companyId);

    void qoo10StoreAdd(StoreQoo10AddReq req, Long userId, Long companyId);

    void wowmaStoreAdd(StoreWowmaAddReq req, Long userId, Long companyId);

    List<String> getAboutToExpireStoreList(Long userId, Long companyId);

}
